package com.example.onlinemonitoring.autoRun;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.example.onlinemonitoring.dao.NewblqsensorMapper;

@Component
public class DatabaseCleanupTask {
    @Autowired
    NewblqsensorMapper newblqsensormapper;

    // @Scheduled(cron = "0 0 0 * * ?") // 每天凌晨执行任务
    // public void cleanupTable() {
    // newblqsensormapper.deleteRecordsBeforeOneWeek();// 针对中绿项目的每天执行一次删除历史表1周之前的记录
    // System.out.println("表内容已删除");
    // }
}
